﻿CREATE TABLE spm.SsasCube  -- we add olap before cube because cube is a sql server reserved word
(
	/*
	 * Table to support the SSAS Partition Manager.  See https://SsasPartitionManager.codeplex.com/documentation for documentation.
     *
	 * Part of the SSAS Partition Manager sample code which can be downloaded from https://SsasPartitionManager.codeplex.com/
	 * 
	 * Written by Dr. John Tunnicliffe, independent business intelligence consultant
	 * Available for consultancy assignments and speaking engagements
     * 	
	 * eMail: john@decision-analytics.co.uk 
	 * http://www.decision-analytics.co.uk/
	 * http://www.sqlbits.com/Speakers/Dr_John_Tunnicliffe
	 * https://www.linkedin.com/in/drjohntunnicliffe
	 */
	SsasCubeKey INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
	SsasCubeName nvarchar(100) NOT NULL,  -- the visible name of the OLAP cube
	SsasDatabaseKey INT NOT NULL, 
    CONSTRAINT [FK_SsasCube_SsasDatabase] FOREIGN KEY (SsasDatabaseKey) REFERENCES spm.SsasDatabase(SsasDatabaseKey),
);
GO
